From: Carlos Garnacho Date: Wed, 16 Nov 2022 10:42:46 +0000 (+0100) Subject: keyboard: Disconnect from InputMethod::terminal-mode-changed on destruction X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~265 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=52253625b84e9f6c6df7a581f307c1590c76ef72;p=gnome-shell.git keyboard: Disconnect from InputMethod::terminal-mode-changed on destruction The OSK may be created and destroyed, while it connects to signals from the longer-lived InputMethod object. This makes these signals linger and issue copious warnings while trying to change the extended keymap and new ratio on a defunct OSK. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6085 Part-of: --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 7e40f62af..78c024524 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1430,8 +1430,9 @@ var Keyboard = GObject.registerClass({ this._ensureKeysForGroup(this._keyboardController.getCurrentGroup()); this._setActiveLayer(0); - Main.inputMethod.connect( - 'terminal-mode-changed', this._onTerminalModeChanged.bind(this)); + Main.inputMethod.connectObject( + 'terminal-mode-changed', this._onTerminalModeChanged.bind(this), + this); this._keyboardController.connectObject( 'active-group', this._onGroupChanged.bind(this),